package com.xiaoran.springmq.counser;

import org.springframework.jms.annotation.JmsListener;
import org.springframework.stereotype.Component;

import javax.jms.JMSException;
import javax.jms.TextMessage;

@Component
public class Topic_Consure {

    @JmsListener(destination = "boot-activemq-topic")
    public void receive(TextMessage message) throws JMSException {
        System.out.println("消费者收到订阅者消息："+message.getText());
    }
}
